import { Field, Int, ObjectType } from "@nestjs/graphql";
import { User } from "@prisma/client";
import { BaseEntity } from "@app/prisma/entitys/baseEntity";
import { ProfileEntity } from "../profile.entity";


@ObjectType()
export class UserEntity extends BaseEntity implements User {

    router: string;

    @Field()
    hash_key: string;

    @Field({ nullable: true })
    account: string;

    @Field()
    name: string;

    @Field(() => Int)
    role: number;

    @Field({ nullable: true })
    address: string

    @Field(() => ProfileEntity)
    profile?: ProfileEntity

    @Field(() => Int)
    profileId: number;

    @Field({ nullable: true })
    token?: string

    @Field({ nullable: true })
    href?: string
}